package com.testmall.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
  * @Description:
  * @Author: littleDesire
  * @Date: 2022-06-21 14:29
  * @Version: 1.0
  *
  */
@ApiModel(value="com-testmall-entity-Product")
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "product")
public class Product implements Serializable {
    /**
     * 商品id
     */
    @TableId(value = "proid", type = IdType.INPUT)
    @ApiModelProperty(value="商品id")
    private String proid;

    /**
     * 类别Id
     */
    @TableField(value = "cateid")
    @ApiModelProperty(value="类别Id")
    private String cateid;

    /**
     * 商品名称
     */
    @TableField(value = "name")
    @ApiModelProperty(value="商品名称")
    private String name;

    /**
     * 商品副标题
     */
    @TableField(value = "subtitle")
    @ApiModelProperty(value="商品副标题")
    private String subtitle;

    /**
     * 产品主图,url相对地址
     */
    @TableField(value = "mainimage")
    @ApiModelProperty(value="产品主图,url相对地址")
    private String mainimage;

    /**
     * 图片地址,json格式,扩展用
     */
    @TableField(value = "subimages")
    @ApiModelProperty(value="图片地址,json格式,扩展用")
    private String subimages;

    /**
     * 商品详情
     */
    @TableField(value = "detail")
    @ApiModelProperty(value="商品详情")
    private String detail;

    /**
     * 价格,单位-元保留两位小数
     */
    @TableField(value = "price")
    @ApiModelProperty(value="价格,单位-元保留两位小数")
    private BigDecimal price;

    /**
     * 库存数量
     */
    @TableField(value = "stock")
    @ApiModelProperty(value="库存数量")
    private Integer stock;

    /**
     * 商品状态.1-在售 2-下架 3-删除
     */
    @TableField(value = "status")
    @ApiModelProperty(value="商品状态.1-在售 2-下架 3-删除")
    private Integer status;

    /**
     * 创建时间
     */
    @TableField(value = "createtime")
    @ApiModelProperty(value="创建时间")
    private Date createtime;

    /**
     * 更新时间
     */
    @TableField(value = "updatetime")
    @ApiModelProperty(value="更新时间")
    private Date updatetime;

    private static final long serialVersionUID = 1L;

    public static final String COL_PROID = "proid";

    public static final String COL_CATEID = "cateid";

    public static final String COL_NAME = "name";

    public static final String COL_SUBTITLE = "subtitle";

    public static final String COL_MAINIMAGE = "mainimage";

    public static final String COL_SUBIMAGES = "subimages";

    public static final String COL_DETAIL = "detail";

    public static final String COL_PRICE = "price";

    public static final String COL_STOCK = "stock";

    public static final String COL_STATUS = "status";

    public static final String COL_CREATETIME = "createtime";

    public static final String COL_UPDATETIME = "updatetime";
}
